#!bin/bash


if [ -n "$1" ] ; then
  data_date=$1
fi



for i in user_info album_info artist_info device_info music_info user_action_log user_info
do
/opt/module/sqoop/bin/sqoop import --connect jdbc:mysql://node101:3306/wyysj  \
    --username root  --password 123456 \
    --delete-target-dir \
    -m 1 \
    --table $i \
    --target-dir /warehouse/ads_basic/wyysj/$i/${data_date} \
    -z \
    --compression-codec gzip \
    --null-string '\\N' --null-non-string '\\N' \
    --fields-terminated-by '\t' --lines-terminated-by '\n'
done